<template>
	<view>
		<view class="u-page">
			<!-- 所有内容的容器 -->
		</view>
		<!-- 与包裹页面所有内容的元素u-page同级，且在它的下方 -->
		<u-tabbar v-model="tabbarSelectId" active-color="#00c9db" :list="list" :mid-button="true"></u-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						iconPath: "home",
						selectedIconPath: "http://resource.leyuanyinyong.cn/images/tabbar/tab_home_s.png",
						text: '首页',
						pagePath: '/pages/index/index'
					}, 
					{
						iconPath: "http://resource.leyuanyinyong.cn/images/tabbar/tab_send_s.png",
						text: '一键定水',
						midButton: true,
						customIcon: false,
						pagePath: '/pages/shop/info'
					}, 
					{
						iconPath: "account",
						selectedIconPath: "http://resource.leyuanyinyong.cn/images/tabbar/tab_user_s.png",
						text: '我的',
						pagePath: '/pages/user/user'
					},
				],
				tabbarSelectId:0,
				beforeSelectId:0,
			}
		},
		props: {
			current: {
				type: Number,
				default: 0
			}
		},
		beforeMount(){
			this.tabbarSelectId = this.current; 
		}
	}
</script>